<?php
//fprintf(resource $stream, string $format, mixed ...$values): int
//fprintf — 将格式化后的字符串写入到流

if (!($fp = fopen('date.txt', 'w'))) {
    return;
}
$year = 2014;
$month = 06;
$day = 06;
fprintf($fp, "%04d-%02d-%02d", $year, $month, $day);
var_dump($_SERVER);
